As you all know, the main source of income for bloggers is ads network i.e. google adsense or other ads network. But there are some internet users, they visit websites using ad blocker on mobile or desktop. In this you cannot generate your profit and suffer because of blogger judgment.
So want all the bloggers to visit their website and see the ads. This will increase his income. Considering this demand I have developed a code to block ads for all types of websites like blogger, wordpress, laravel.
You can use this code to identify ad blocker users on all of your websites and prevent them from viewing website articles. So how to use ad blocker? This is explained in detail below:
What is Ad Blocker?
Ad blocker allows users to remove ads from websites including video ads. An ad blocker is a program that blocks advertisements on websites. It can block most types of internet ads including html-based animation and video formats as well as javascript and flash programs.
Website Adblock Detector


You will get many plugins to use website ad blocker and with the help of this plugin you can block ad. But it turns out that many plugins do not work properly and because of using these plugins, your website uses a lot of JavaScript code. This slows down the loading speed of your website.
So I'll give you a little JavaScript code. You can use ad-blocker in your theme.
<style>
.note{position:relative;padding:20px 30px 20px 50px;background-color:#e1f5fe;color:#01579b;font-size:.85rem;line-height:1.62em;border-radius:2px}
.note:before{content:'\2605';position:absolute;left:18px;font-size:20px}
.noteAlert{background-color:#ffdfdf;color:#e65151}
.noteAlert:before{content:'\2691'}
</style>
<script>//<![CDATA[
!function() {function f() {var a=document.querySelector(".article-content.dont-break-out");a.innerHTML='<p class="note noteAlert blocked"><strong>Ad-block detected:((</strong><br><br>Sorry, We have detected that you have activated ad-blocker <br> Please consider supporting us by disabling your ad-blocker, it helps us keep this website free.<br> Please disable adblocker and refresh the page to view the article.<br><br>Thank you!!!</p>';} var b=document.createElement("script");b.type="text/javascript";b.async=!0;b.src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";b.onerror=function() {f();window.adblock=!0};var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(b,e)}();
//]]></script>The above code is the English version of the class
If you want to use Bengali notice on your website, then you can use above code. And it is used throughout the class.
<style>
.note{position:relative;padding:20px 30px 20px 50px;background-color:#e1f5fe;color:#01579b;font-size:.85rem;line-height:1.62em;border-radius:2px}
.note:before{content:'\2605';position:absolute;left:18px;font-size:20px}
.noteAlert{background-color:#ffdfdf;color:#e65151}
.noteAlert:before{content:'\2691'}
</style>
<script>//<![CDATA[
!function() {function f() {var a=document.querySelector(".article-content.dont-break-out");a.innerHTML='<p class="note noteAlert blocked"><strong>Ad-Block Detected :((</strong><br><br>Sorry, We detected that you have activated Ad-Blocker. <br> Please Consider supporting us by disabling your Ad-Blocker,It helps us in maintaining this website. <br>To View the content disable adblocker and refresh the page.<br><br>Thank You !!!</p>';} var b=document.createElement("script");b.type="text/javascript";b.async=!0;b.src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js";b.onerror=function() {f();window.adblock=!0};var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(b,e)}();
//]]></script>